function commonFunc() {
  console.log(new.target) // undefined
}

function ClassFunc() {
  console.log(new.target) // ClassFunc
  this.name = 'wsj'
}

console.dir(commonFunc.prototype)
console.dir(ClassFunc.prototype)

commonFunc()
new ClassFunc()
ClassFunc()